Skip to content

refactor(express): split pingExpress into v1 and v2#8563

Open
rishikeshdadam136 wants to merge 1 commit intomasterfrom
WCI-188
Open

refactor(express): split pingExpress into v1 and v2#8563
rishikeshdadam136 wants to merge 1 commit intomasterfrom
WCI-188

Conversation

@rishikeshdadam136
Copy link
Copy Markdown
Contributor

Ticket: WCI-188

Context - https://bitgo.slack.com/archives/C057BHBRG4B/p1764020095794829?thread_ts=1764018507.602879&cid=C057BHBRG4B

The API behavior is not changing. We are splitting the combined v[12] route into two separate V1 and V2 routes, so both will continue to work and clients will not be affected.

@linear
Copy link
Copy Markdown

linear Bot commented Apr 19, 2026

@rishikeshdadam136 rishikeshdadam136 changed the title docs(express): split pingExpress into v1 and v2 refcactor(express): split pingExpress into v1 and v2 Apr 21, 2026
@rishikeshdadam136 rishikeshdadam136 changed the title refcactor(express): split pingExpress into v1 and v2 refactor(express): split pingExpress into v1 and v2 Apr 22, 2026
@rishikeshdadam136 rishikeshdadam136 requested a deployment to breaking-changes-override April 22, 2026 18:14 — with GitHub Actions Waiting
@rishikeshdadam136 rishikeshdadam136 marked this pull request as ready for review April 23, 2026 06:47
@rishikeshdadam136 rishikeshdadam136 requested review from a team as code owners April 23, 2026 06:47
}

function handlePingExpress(req: ExpressApiRouteRequest<'express.pingExpress', 'get'>) {
function handlePingExpress(req: ExpressApiRouteRequest<'express.pingexpress', 'get'>) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handlePingExpress is wired to both express.v1.pingexpress and express.pingexpress, but the parameter type only mentions express.pingexpress. Update to ExpressApiRouteRequest<'express.v1.pingexpress' | 'express.pingexpress', 'get'> so the type matches both registrations.

// V2 routes should be added to www/config/routesV2.js

// ping
// /api/v[12]/pingexpress is the only exception to the rule above, as it explicitly checks the health of the
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update comments so it matches the split

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a minimal test that both GET /api/v1/pingexpress and GET /api/v2/pingexpress resolve and return the expected payload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants